﻿<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>我的收藏夹</title>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/css/common.css}" rel="stylesheet">
    <link th:href="@{/css/user.css}" rel="stylesheet">


</head>
<body>
<div class="container" style="background:white">
    <div class="row">
        <div class="col-md-12">
            <header><h1>我的收藏夹</h1></header>
        </div>
    </div>
    <div th:replace="~{commons/common::topbar}"></div>
    <div class="row">
        <div class="col-md-9 col-sm-12">
            <!--我写的博客列表-->
            <div class="user-info-box" >
                <div class="user-info-inner-box" style="height: 639px">
                    <table class="table table-hover table-striped text-center">
                        <thead>
                        <tr>
                            <th class="text-center">发布时间</th>
                            <th class="text-center">博客ID</th>
                            <th class="text-center">博客标题</th>
                            <th class="text-center">博客类型</th>
                            <th class="text-center">观看数</th>
                            <th class="text-center">点赞数</th>
                            <th class="text-center">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="blog:${blogs}">
                            <td th:text="${blog.createTime}"></td>
                            <td th:text="${blog.id}"></td>
                            <td th:text="${blog.title}"></td>
                            <td><img th:src="@{/imgs/{src}(src = ${blog.labelImage})}" alt="Responsive image"
                                     style="width: 21px;" th:title="${blog.labelName}">
                            </td>
                            <td th:text="${blog.views}"></td>
                            <td th:text="${blog.likes}"></td>
                            <td>
                                <a th:href="@{/blog/detail/{id}(id = ${blog.blogId})}">
                                    <span style="color: royalblue" class="glyphicon glyphicon-search" title="查看"></span>
                                </a>&nbsp;
                                <a th:href="@{/user/unCollect2/{id}(id = ${blog.blogId})}"
                                   onClick="return confirm('确定取消收藏该博客吗?');">
                                    <img th:src="@{/imgs/uncollect.jpg}" alt="error image" title="取消收藏" style="width: 20px">
                                </a>
                            </td>
                        </tr>
                        </tbody>


                    </table>
                    <!--分页-->
                    <div class="col-sm-12 text-center">
                        <nav aria-label="Page navigation">
                            <ul class="pagination">
                                <li>
                                    <a th:href="@{/user/myCollectList(pageNo=(${pageNo}>1 ? ${pageNo}-1:1))}"
                                       aria-label="Previous">
                                        <span aria-hidden="true">&laquo;</span>
                                    </a>
                                </li>
                                <li th:each="pageNum:${pageNumList}" th:class="${pageNum == pageNo ? 'active':''}"><a
                                        th:href="@{/user/myCollectList(pageNo=(${pageNum}))}"
                                        th:text="${pageNum} "></a></li>
                                <li>
                                    <a th:href="@{/user/myCollectList(pageNo=(${pageNo}<${totalPage} ? ${pageNo}+1:${totalPage}))}"
                                       aria-label="Next">
                                        <span aria-hidden="true">&raquo;</span>
                                    </a>
                                </li>
                            </ul>
                        </nav>
                    </div>
                    <!--END分页-->
                </div>
            </div>

        </div>
        <div class="col-md-3 col-sm-12">
            <div th:replace="~{commons/common::headerimage}"></div>
            <div th:replace="~{commons/common::hotrange}"></div>
        </div>
    </div>
    <div th:replace="~{commons/common::footer}"></div>

</div>
</body>
<script th:src="@{/js/jquery-1.11.0.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/button.js}"></script>
</html>